﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace QUANLYVATTU
{
    class HANGHOADAL
    {
        public HANGHOADAL()
        {
        }       
        public DataTable DocDanhSachHangHoa()
        {
            SqlConnection conn = new SqlConnection();
            conn.ConnectionString= @"Data Source=QUYNHUYEN\SQLEXPRESS;Initial Catalog=QLVT; User Id=sa; Password=sa";
            conn.Open();
            SqlCommand cmd = new SqlCommand("select * from hanghoa", conn);
              SqlDataReader dr = cmd.ExecuteReader();
            DataTable dt = new DataTable();
            dt.Load(dr);
            return dt;

        }

    }
}
